import request from '@/utils/request'

export function getListFromServer(page,pageSize,statusList,projectName,projectType,userId) {
  return request({
    url: '/project/page',
    method: 'post',
    data:{page:page,pageSize:pageSize,status:statusList,key:projectName,projectType:projectType,userId:userId }
  })
}
export function getDetailFromServer(id) {
  return request({
    url: '/project/'+id,
    method: 'get',
  })
}
//获取审核详情(后端写的审核叫做review)
export function getApprovalFromServer(id) {
  return request({
    url: '/review/' + id,
    method: 'get',
  })
}
//提交任务接口
export function submitTaskToServer(data){
  return request({
    url: '/director/submitTask',
    method: 'post',
    data:data
  })
}
//获取任务列表
export function getTaskFromServer(id){
  return request({
    url: '/task/'+id,
    method: 'get',
  })
}
//获取团队信息
export function getTeamFromServer(id){
  return request({
    url: '/team/'+id,
    method: 'get',
  })
}
//提交团队信息
export function submitTeamToServer(data){
  return request({
    url: '/director/submitTeam',
    method: 'post',
    data:data
  })
}
//更新打勾信息
export function updateConfirm(data){
  return request({
    url: '/task/update',
    method: 'put',
    data:data
  })
}
//添加task信息
export function uploadTaskFileToServer(files,taskId){
  return request({
    url: '/task/submitFile',
    method: 'post',
    data:{files:files,taskId:taskId},
    
  })
}
//查找所有意见
export function getAgreeOpinionFromServer(id) {
  return request({
    url: '/agree/' + id,
    method: 'get',
  })
}
//获取项目类型
export function getProjectTypeFromServer() {
  return request({
    url: '/common/type',
    method: 'get',
  })
}
